package com.xiaoq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class ESIndexNameProperties {

    private static Logger logger = LoggerFactory.getLogger(ESIndexNameProperties.class);

	/**
	 *  动态配置indexName, 处理打不同的profile
	 */
	@Value("${es.sitesIndexName}")
	private String sitesIndexName;

	@Bean
	public String sitesIndexName(){
		return sitesIndexName;
	}

	public String getSitesIndexName() {
		return sitesIndexName;
	}

	public void setSitesIndexName(String sitesIndexName) {
		this.sitesIndexName = sitesIndexName;
	}
}
